package com.example.newscrolling.enity;

import android.content.ContentValues;

public class Movie {
	private int id;
	private String time;
	private String name;
	private byte[] image;
	

	public Movie() {
		super();
	}

	public Movie(int id, String time, String name,byte[] image) {
		super();
		this.id = id;
		this.time = time;
		this.name = name;
		this.image = image;
	}

	//
	// public User(int id, String name, int money, byte[] image) {
	// super();
	// this.id = id;
	// this.name = name;
	// this.money = money;
	// this.image = image;
	// }

	
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getTime() {
		return time;
	}

	public void setTime(String time) {
		this.time = time;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	
	public byte[] getImage() {
		return image;
	}

	public void setImage(byte[] image) {
		this.image = image;
	}

	//@SuppressLint("DefaultLocale")
	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return String.format("%s\n" + "片名: " + "%s", time ,name );
	}

	public ContentValues toContentValues() {
		ContentValues data = new ContentValues();
//		data.put("ID", this.id);// 這個不需要，因為database會自動建立
		data.put("TIME", this.time);
		data.put("NAME", this.name);
		data.put("IMAGE", this.image);
		return data;
	}

}
